import request from '@/utils/request'

// 查询案件处理审批表列表
export function listCaseProcessApproval(query) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/list',
    method: 'get',
    params: query,
  })
}

// 查询详细
export function getCaseProcessApproval(id) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/' + id,
    method: 'get',
  })
}

// 新增审批
export function addCaseProcessApproval(data) {
  return request({
    url: '/ruoyi-system/caseprocessapproval',
    method: 'post',
    data: data,
  })
}

// 修改审批
export function updateCaseProcessApproval(data) {
  return request({
    url: '/ruoyi-system/caseprocessapproval',
    method: 'put',
    data: data,
  })
}

// 删除审批
export function delCaseProcessApproval(id) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/' + id,
    method: 'delete',
  })
}

// 预览

export function previewCaseProcessApproval(params) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addCaseProcessApprovalFiles(data) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportCaseProcessApproval(data) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/caseprocessapproval/caseList',
    method: 'get',
  })
}

// 获取处罚决定书填的内容呢
export function getContent(id) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/getContent?caseId=' + id,
    method: 'get',
  })
}

// 提交流程接口
export function submitCaseProcessApproval(data) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/submit',
    method: 'post',
    data,
  })
}

// 审核接口
export function reviewCaseProcessApproval(data) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/review',
    method: 'post',
    data,
  })
}

// 转办接口
export function transferCaseProcessApproval(data) {
  return request({
    url: '/ruoyi-system/caseprocessapproval/transferTask',
    method: 'post',
    data,
  })
}
